home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
OWL
/
SETWPLAC
/
SETWPLAC.PAS
Wrap
Pascal/Delphi Source File
|
1994-03-02
|
2KB
|
61 lines
{************************************************}
{ }
{ ObjectWindows Demo }
{ Copyright (c) 1992 by Borland International }
{ }
{************************************************}
program SetWPlac;
uses WinTypes, WinProcs, OWindows, Win31;
type
PStepWindow = ^TStepWIndow;
TStepWindow = object(TWindow)
constructor Init(AParent: PWindowsObject; ATitle: PChar);
procedure WMLButtonDown(var Msg: TMessage);
virtual wm_First + wm_LButtonDown;
end;
TMyApplication = object(TApplication)
procedure InitMainWindow; virtual;
end;
constructor TStepWindow.Init(AParent: PWindowsObject; ATitle: PChar);
begin
inherited Init(AParent, ATitle);
end;
procedure TStepWindow.WMLButtonDown(var Msg: TMessage);
const
Gl1Placement: TWindowPlacement = (Length: 22; Flags: WPF_SetMinPosition;
ShowCmd: Sw_Maximize;
PtMinPosition: (x:1; y: 1);
ptMaxPosition: (x:10; y: 10);
rcNormalPosition: (Left:1; Top:1;
Right:100; Bottom:100)
);
var
Size: Integer;
begin
MessageBeep($FFFF);
{ Gl1Placement.rcNormalPosition }
Size := SizeOf(TWindowPlacement);
SetWindowPlacement(HWindow, @Gl1Placement);
end;
procedure TMyApplication.InitMainWindow;
begin
MainWindow := New(PStepWindow, Init(nil, 'Steps'));
end;
var
MyApp: TMyApplication;
begin
MyApp.Init('Steps');
MyApp.Run;
MyApp.Done;
end.